package n1145;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	static boolean flag;
	
	static int result;
	
	static void rebuild(String str,int v)
	{
		//System.out.println(str+","+v);
		if(flag)return;
		if(str.equals("()")){
			return;
		}
		int a=0,data=0;
		int lstart=0,lend=0;
		String left="",right="";
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='('){
				if(a==1&&lstart==0)
				{
					data=Integer.parseInt(str.substring(1, i));
					lstart=i;
					a=0;
				}
				a++;
			}
			else if(str.charAt(i)==')'){
				a--;
				if(a==0){
					lend=i+1;
					break;
				}
			}
		}
		left=str.substring(lstart,lend);
		right=str.substring(lend,str.length()-1);
		
		if(left.equals("()")&&right.equals("()"))
		{
			if(v+data==result){
				flag=true;
			}
			return;
		}
		//访问左子树
		rebuild(left,v+data);
		//访问右子树
		rebuild(right,v+data);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{

		BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		Scanner cin=new Scanner(bf);
		StringBuffer sb=new StringBuffer();
		int a=0;
		boolean hasresult=false;
		while(cin.hasNext())
		{
			if(hasresult==false){
				result=cin.nextInt();
				hasresult=true;
			}
			else{
				String tmp=cin.next();
				for(int i=0;i<tmp.length();i++)
				{
					if(tmp.charAt(i)=='(')a++;
					else if(tmp.charAt(i)==')'){
						a--;
						if(a==0)
						{
							sb.append(tmp.substring(0, i+1));
							flag=false;
//							System.out.println(sb.toString());
							rebuild(sb.toString(), 0);
							if(flag==true)
							{
								System.out.println("yes");
							}else{
								System.out.println("no");
							}
							//开始下一个testcase
							hasresult=false;
							sb.setLength(0);
							sb.append(tmp.substring(i+1));
							break;
						}
					}
				}
				if(hasresult)sb.append(tmp);
			}
		}
	}

}
